<template>
	<view class="index">
		<view :style="{'height': `${statusBarHeight}px`, 'background-color': '#050033'}"></view>
		<uni-nav-bar backgroundColor="#050033;" @clickLeft="goBack" color="#FFF" left-icon="left" :title="$t('index.text-32')"
			:border="false" />
		<view class="logo">
			<image class="logo-ic" src="@/static/logo.png" alt="" />
			<view class="lang-wrap" @click="changeLanguage">
				<image src="../../static/100.png" mode=""></image>
				<text>{{$t('locale.lang')}}</text>
			</view>
		</view>
		<view class="success-info">
			<image class="success-ic" src="../../static/102.png" mode=""></image>
			<view class="success-title">{{$t('index.text-32')}}</view>
			<view class="success-text">{{$t('index.text-33')}}</view>
			<div class="success-btn" @click="goBack">{{$t('index.text-49')}}</div>
		</view>
	</view>
</template>

<script>
	import uniNavBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue"
	const collection = "hello";
	export default {
		components: {
			uniNavBar
		},
		data() {
			return {
				statusBarHeight: 44,
			}
		},
		onLoad(o) {
			let evenId = o.evenId;
			this.evenId = evenId;
			this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
		},
		methods: {
			goBack() {
				uni.redirectTo({
					url: '/pages/Registrate/Registrate?evenId=' + this.evenId
				})
			},
			changeLanguage() {
				if (this.$i18n.locale == 'zh') {
					this.$i18n.locale = 'en';
					uni.setStorageSync('locale', 'en')
				} else {
					this.$i18n.locale = 'zh';
					uni.setStorageSync('locale', 'zh')
				}
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #fff;
	}
	
	.logo {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20upx 30upx;
		background-color: #050033;
	
		.logo-ic {
			width: 78upx;
			height: 64upx;
		}
	
		.lang-wrap {
			display: flex;
			align-items: center;
			color: #fff;
			font-size: 24upx;
	
			image {
				width: 30upx;
				height: 30upx;
				margin-right: 12upx;
			}
		}
	}
	
	.success-info {
		padding-top: 328upx;
		text-align: center;
		
		.success-ic {
			width: 140upx;
			height: 165upx;
			margin: 0 auto 50upx;
		}
		
		.success-title {
			font-size: 36upx;
			color: #333333;
			margin-bottom: 14upx;
		}
		
		.success-text {
			font-size: 28upx;
			color: #666666;
		}
		
		.success-btn {
			display: inline-block;
			width: auto;
			height: 90upx;
			line-height: 90upx;
			min-width: 362rpx;
			padding: 0 32upx;
			margin: 94upx auto 0;
			color: #fff;
			font-size: 30upx;
			background-color: #d3a86a;
			border-radius: 10upx;
			box-sizing: border-box;
		}
	}
</style>